package scjp.threads.interaction;

public class ThreadB extends Thread {

    int total;

    public void run() {

        synchronized (this) {

            for (int i = 0; i < 100; i++) {

                total += i;
            }
            notify();

        }
    }

    public int getTotal() {
        return total;
    }
}
